#include <asm.h>
#include <regdef.h>
#include <new_inst_test.h>

LEAF(my4_madd_test)
    .set noreorder
    addiu s0, s0 ,1
    addiu s2, zero, 0x0
    lui   t2, 0x1
###test inst
    li t0,0x2222;
    li t1,0x3333;
    madd t0,t1;

    TEST_MType(0x45b90738, 0xd70d64f0, 0x0a20a481, 0xf4d903bd,0x1,0x2,madd)
    TEST_MType(0x99a451b0, 0xbe3d9998, 0x8552b082, 0x1a4b01b1,0x2,0x3,madd)
    TEST_MType(0x85931c58, 0xfb710fb5, 0xda843239, 0x022e0edf,0x1,0x1,madd)
    TEST_MType(0x650e4043, 0x64c17218, 0x7076dc49, 0x27c5ede3,0x1,0x1,madd)
    TEST_MType(0xa00c6c50, 0x8e9df080, 0x78d12801, 0x2a7f453f,0x1,0x1,madd)
    TEST_MType(0x99c874b6, 0xd7ce83e0, 0xe7934141, 0x100c6ff5,0x1,0x1,madd)
    TEST_MType(0x1c62f360, 0x34580400, 0xb4cd8001, 0x05cddbe5,0x1,0x1,madd)
    TEST_MType(0x99b80b00, 0x6c463000, 0x84100001, 0xd4bd99ca,0x1,0x1,madd)
    TEST_MType(0xdc823390, 0x5208f838, 0x1aeec781, 0xf4a0762d,0x1,0x1,madd)
    TEST_MType(0xe53080d8, 0x848a9c5a, 0xf600ebf1, 0x0cedfd5d,0x1,0x1,madd)
    TEST_MType(0x7f2163d8, 0xab5bba80, 0x9904dc01, 0xd5f77756,0x1,0x1,madd)
    TEST_MType(0xea7b88c0, 0x23eed510, 0xd3004c01, 0xfcfad0a3,0x1,0x1,madd)
    TEST_MType(0x7389b4fd, 0xea063940, 0x0ba79441, 0xf614f984,0x1,0x1,madd)
    TEST_MType(0xbcdf9b20, 0xc1451978, 0x4e96d701, 0x1072da6b,0x1,0x1,madd)
    TEST_MType(0xdcacfd50, 0x809d0a80, 0x7273c801, 0x1193d5fd,0x1,0x1,madd)
    TEST_MType(0x55ed3100, 0xbe5ba9f2, 0x3a915201, 0xe9f79dba,0x1,0x1,madd)
    TEST_MType(0xcedb5fd8, 0xe1793b60, 0x4672b901, 0x05dc29b0,0x1,0x1,madd)
    TEST_MType(0x9d32f1b0, 0xbb2016b8, 0x2362d681, 0x1a94e276,0x1,0x1,madd)
    TEST_MType(0x7091ae43, 0xdb390460, 0x9b456521, 0xefd4042d,0x1,0x1,madd)
    TEST_MType(0x549bf440, 0xd1dc9f40, 0x2ab0d001, 0xf0c048d1,0x1,0x1,madd)
    TEST_MType(0x63b241cc, 0x48aefe14, 0xbfdd8bf1, 0x1c4e489d,0x1,0x1,madd)
    TEST_MType(0x4c925040, 0x0855d2c8, 0x7d633201, 0x027e3e23,0x1,0x1,madd)
    TEST_MType(0xdb2dfd2c, 0x6c0e9f09, 0xad443a8d, 0xf0754c73,0x1,0x1,madd)
    TEST_MType(0xdfdc9250, 0xbf1f15c3, 0x04b402f1, 0x082517d5,0x1,0x1,madd)
    TEST_MType(0x1b339b35, 0x98c14bc0, 0x0021eec1, 0xf50792e8,0x1,0x1,madd)
    TEST_MType(0xc8618b98, 0x69452a40, 0x1141d601, 0xe920fb5f,0x1,0x1,madd)
    TEST_MType(0x2aea0580, 0x7f50d684, 0xf943d601, 0x1557a5d2,0x1,0x1,madd)
    TEST_MType(0x5c69f5ec, 0x9ee23bd2, 0xfcf11f99, 0xdcf11aff,0x1,0x1,madd)
    TEST_MType(0xb7b66b40, 0x8b50c179, 0xa013f141, 0x20f2d35c,0x1,0x1,madd)
    TEST_MType(0x514e33b6, 0x7dc39988, 0x30153eb1, 0x27f14e95,0x1,0x1,madd)
    TEST_MType(0x27c24e12, 0xbc0e6874, 0x70beb029, 0xf572a01d,0x1,0x1,madd)
    TEST_MType(0xe7e6eddc, 0x13a7cad0, 0x21d4dac1, 0xfe265836,0x1,0x1,madd)
    TEST_MType(0xa85111c0, 0xa29d50f0, 0x844ca401, 0x1ffc597b,0x1,0x1,madd)
    TEST_MType(0x73d52eb8, 0x142ba310, 0x32fa1381, 0x0920663e,0x1,0x1,madd)
    TEST_MType(0x41156884, 0x794c5fb2, 0x9ddba7c9, 0x1ed68916,0x1,0x1,madd)
    TEST_MType(0xa8774820, 0xb2cf0480, 0xaaa49001, 0x1a64def0,0x1,0x1,madd)
    TEST_MType(0xb69bcb80, 0x88d55520, 0xdf8af001, 0x2229cfd5,0x1,0x1,madd)
    TEST_MType(0xe84175d8, 0x94048f1c, 0xaf5c8ba1, 0x0a03f609,0x1,0x1,madd)
    TEST_MType(0x6fdedbd8, 0x67dd7f60, 0x341a9901, 0x2d637582,0x1,0x1,madd)
    TEST_MType(0xa2319526, 0xd5f88700, 0x40770a01, 0x0f669a84,0x1,0x1,madd)
    TEST_MType(0x61f8b9bc, 0x146e6d38, 0xd445ad21, 0x07d1b12f,0x1,0x1,madd)
    TEST_MType(0xb9002828, 0x0310a1b9, 0xc4de2ce9, 0xff2663a1,0x1,0x1,madd)
    TEST_MType(0xb4418f47, 0x943f129c, 0xc27f4d45, 0x1fe1ae2f,0x1,0x1,madd)
    TEST_MType(0xd7011f8c, 0x70d8ea80, 0x6585be01, 0xededc133,0x1,0x1,madd)
    TEST_MType(0x058b9998, 0x55395538, 0x3b611141, 0x01d897ee,0x1,0x1,madd)
    TEST_MType(0xc13b7fc0, 0xda192fbb, 0x0caa9141, 0x094afe26,0x1,0x1,madd)
    TEST_MType(0x776d24b0, 0x66f0a9a4, 0x1423b0c1, 0x3005c215,0x1,0x1,madd)
    TEST_MType(0x6c6ae338, 0x5c4abc80, 0x827ebc01, 0x27161063,0x1,0x1,madd)
    TEST_MType(0x9dc090e0, 0xb6324980, 0x55585001, 0x1c530987,0x1,0x1,madd)
    TEST_MType(0x86d609de, 0xcd4bcb2e, 0x9e52cfe5, 0x17ff7c94,0x1,0x1,madd)
    TEST_MType(0x1400c7dc, 0x466a6d5e, 0x967a0ec9, 0x05808785,0x1,0x1,madd)
    TEST_MType(0xa2d88860, 0x26423686, 0x52dba241, 0xf2140c3b,0x1,0x1,madd)
    TEST_MType(0x6770770a, 0x812cbe10, 0x6f18dca1, 0xccc14913,0x1,0x1,madd)
    TEST_MType(0x95627048, 0xc1bae8ca, 0xf1bdd8d1, 0x19eeeef1,0x1,0x1,madd)
    TEST_MType(0x1dbadda0, 0x5d2b0f50, 0x9741a201, 0x0ad1e2ae,0x1,0x1,madd)
    TEST_MType(0xc7cf4f96, 0x7dd33820, 0x29f4c2c1, 0xe461dd6a,0x1,0x1,madd)
    TEST_MType(0xa1d8f960, 0xb83e3183, 0xbf02fc21, 0x1a641a34,0x1,0x1,madd)
    TEST_MType(0xcc2c955e, 0x63c2877e, 0x8bf21645, 0xebcddc1f,0x1,0x1,madd)
    TEST_MType(0xd2d44530, 0x602b39e6, 0x4d2dd921, 0xef07f963,0x1,0x1,madd)
    TEST_MType(0x886c3ad7, 0xe011a4c0, 0xaf24dd41, 0x0eea3ae1,0x1,0x1,madd)
    TEST_MType(0x0c45d0c8, 0x830e02fb, 0x57054419, 0xfa029505,0x1,0x1,madd)
    TEST_MType(0x49979c44, 0x298742f0, 0x604807c1, 0x0bf02a39,0x1,0x1,madd)
    TEST_MType(0x2037c800, 0xfb355f34, 0xa68ca001, 0xff65a0a0,0x1,0x1,madd)
    TEST_MType(0x21e68aeb, 0xc1cc4ec0, 0x897fca41, 0xf7c351f5,0x1,0x1,madd)
    TEST_MType(0xe2c488b8, 0x8ed6a9d8, 0x6de4d341, 0x0cebf804,0x1,0x1,madd)
    TEST_MType(0x0622c000, 0x849e669e, 0x21f28001, 0xfd0af6e9,0x1,0x1,madd)
    TEST_MType(0xfe11325e, 0x5a980480, 0x4132a701, 0xff50e5e3,0x1,0x1,madd)
    TEST_MType(0xb582a660, 0x27161c30, 0x3ef1b201, 0xf4a07860,0x1,0x1,madd)
    TEST_MType(0xde436ee0, 0x0b8fd2ea, 0x09b718c1, 0xfe79f1a4,0x1,0x1,madd)
    TEST_MType(0x3ca5ebcc, 0x7fca89b0, 0xc03a4841, 0x1e464b85,0x1,0x1,madd)
    TEST_MType(0xed8ac2a2, 0x8e11d628, 0xe523d551, 0x0836ec1a,0x1,0x1,madd)
    TEST_MType(0xee62ac9c, 0x446aed90, 0x59e583c1, 0xfb4ada5d,0x1,0x1,madd)
    TEST_MType(0xa5a41fa0, 0x901ecf7a, 0x5a897241, 0x277d522b,0x1,0x1,madd)
    TEST_MType(0x1665a95c, 0x01fa0f1c, 0x27e2ea11, 0x002c4644,0x1,0x1,madd)
    TEST_MType(0xf760c288, 0x024d9a70, 0x0242eb81, 0xffec246d,0x1,0x1,madd)
TEST_MType(0xe43273f3,0x28ee3fd8,0x1f9ae8db,0x00fb4c94,0x669646d3,0x056d4a7d,madd)
TEST_MType(0x36e0f524,0xc6a75db0,0x703b650e,0xfdd0baed,0x3a08c84e,0x0a1bd1a2,madd)
TEST_MType(0xf1f8e6de,0x1e598995,0x25242c8f,0x543285f9,0xd48aff59,0x55dc42ed,madd)
TEST_MType(0x18307cf0,0x73a50467,0x01f5c0dc,0x7cfadc4a,0x2dcfbc4c,0x720d7c7f,madd)
TEST_MType(0x2d147a45,0x78a8335c,0x00408eb8,0xcb68b172,0x2340deec,0xb62979a6,madd)
TEST_MType(0x9b1efb5f,0x4cf8216a,0x542bfd2b,0x8b0907e3,0x62e8a8d5,0xa95d9c6a,madd)
TEST_MType(0x719f3743,0xe5025be9,0x018347ac,0xcd6a6dd9,0xa16f2ab1,0xd9652ca4,madd)
TEST_MType(0x4cff8e15,0x0049dde5,0x88a3437b,0xbba9a4e1,0x866409b2,0xbb936d45,madd)
TEST_MType(0x0d5316bb,0x3a5b31ad,0x96236b50,0xf853c88e,0x3b2a43f1,0xf54a3649,madd)
TEST_MType(0x0760e0b2,0x3ef51581,0xa1d7f584,0xa6973b41,0xd13e21d2,0xa4c6b481,madd)
TEST_MType(0xf56c99bd,0x3d754d5c,0xc2954252,0x5d5b95e4,0x98ef2966,0x5fe58dd3,madd)
TEST_MType(0x81b00784,0xd12050ef,0x77a97e20,0x35bd1c0e,0xad7939e4,0x1e9c5f5e,madd)
TEST_MType(0x306107e3,0xef922d82,0x69483159,0x087bc2d0,0x5d294913,0x0b969466,madd)
TEST_MType(0x8d2e78aa,0x4ed3b34c,0x48258d78,0x1e99b09d,0x9fdcdd00,0x41f47af7,madd)
TEST_MType(0x2043ee62,0x53dac4d6,0x243a36f8,0xcf2c6f46,0x6379e90c,0xc49ad654,madd)
TEST_MType(0x13efbe61,0x59b5d052,0xde9fe59b,0x4d4ce33e,0x5d911a89,0x46506154,madd)
TEST_MType(0xaeb63f44,0x797d6e41,0x41c7783d,0xc66f1c4d,0x8e1e2ff9,0xed02cc6c,madd)
TEST_MType(0x4f9fac90,0xf9b9431d,0x877256a3,0x18859a5e,0xf4221a53,0x1a7958d3,madd)
TEST_MType(0xb85affd3,0x3376990c,0x1d7f8937,0xfe81bad5,0x22147053,0x0ce8cac1,madd)
TEST_MType(0xa6df648a,0xe3854cce,0x923ea9d1,0x4e8e215b,0x5ef0cac5,0x44a3d86d,madd)
TEST_MType(0xc676b7a7,0x5ead9551,0x9584982d,0xda9a245b,0x43354956,0xefe19041,madd)
TEST_MType(0xac84503a,0x4297c576,0x3e4f3840,0xf5c407d8,0xa15f9b84,0x0b7b6983,madd)
TEST_MType(0x4b653bf4,0x51644de3,0xbf4ec814,0x3b766d6f,0xd2323ab8,0x237ddafc,madd)
TEST_MType(0x44ebb3b8,0x3da016bf,0xb5894392,0x64ae4d41,0xdd3c5d4a,0x541709ff,madd)
TEST_MType(0xbf9aca26,0x07b80370,0x1dd64ad5,0xe79f7cd4,0x246f6835,0xe9908ae9,madd)
TEST_MType(0xd1c4602f,0x5744ad6f,0xf8891e89,0xbd1bec8f,0xc9e7a728,0xccde9709,madd)
TEST_MType(0xde4de67e,0x9108beed,0xce4d1728,0x650951e5,0x9d2d3082,0x566e3f89,madd)
TEST_MType(0xad9255c1,0x4b9b01b4,0x2a675228,0x39262e31,0x16524574,0x517e3804,madd)
TEST_MType(0x5276ab03,0x5a51fa80,0xb9561e24,0xae46f527,0x710caea4,0x912ed4cb,madd)
TEST_MType(0xb63755db,0x2c2452c3,0x139c9c3a,0xf4a5a278,0xd72a1069,0x015e97c9,madd)
TEST_MType(0x63cb7294,0x1a07e7e3,0x3ea11a29,0x9bc8f94e,0x02caf4ed,0x91a33ab6,madd)
TEST_MType(0xfb7b824b,0xb59613df,0xf3dde307,0x72de6951,0x59a9d2b2,0x718e3e79,madd)
TEST_MType(0x751e5f9a,0x230690ee,0x804129bc,0x0a92cb61,0x3ca1a890,0xfa8ca34b,madd)
TEST_MType(0xa8126b38,0x064b55b3,0x6cbffb5b,0x49221bf1,0x10dd6b33,0x4b4b8d78,madd)
TEST_MType(0x77ffc65a,0x3b471fda,0x940031dc,0xcbc5ef21,0xaa366338,0xaffca58d,madd)
TEST_MType(0x9c6453dd,0x7524dda8,0x40a63cc1,0x690585a7,0x36556ab9,0x969a0376,madd)
TEST_MType(0x3293551a,0xee61276d,0x4747e876,0x86e58541,0xe1bbb664,0x8a60afa0,madd)
TEST_MType(0xb7561b40,0x76f562c3,0x34d9d551,0x2c6c37aa,0x03949391,0x4e302dbb,madd)
TEST_MType(0x27946597,0x765f1532,0x67756d38,0x69f93709,0x331b32ba,0x57ac1cdd,madd)
TEST_MType(0x60cfb639,0xac03a24e,0x2bc080b8,0x9da44cbf,0xcc7be95a,0xbd6714ba,madd)
TEST_MType(0x49cee7b5,0xaab39695,0xd209e37a,0x89233589,0x6b49f921,0xa1baf04a,madd)
TEST_MType(0xb929a021,0xf284d22b,0xeae194d6,0xbdbbab31,0xe8849d4b,0xba00b2a5,madd)
TEST_MType(0x6522a926,0xc3923554,0xc8d130aa,0x17153b44,0x02c0d232,0x2ef4babd,madd)
TEST_MType(0x60eae20f,0x7ab5a95e,0x5fc275d7,0xa8fb1a61,0xbfac8d55,0x7a866476,madd)
TEST_MType(0x1186587e,0x72358bb3,0xbbd0d1c6,0xd70d4e47,0x1abe87ac,0xcf3bd07f,madd)
TEST_MType(0x25b50de3,0x2bffdafc,0x283f408d,0x82bb51d4,0xe6154719,0x7c4038e5,madd)
TEST_MType(0x2e5d8ae5,0xe8b4c213,0x386eede4,0xe7191263,0xb33814e5,0xeb511a7d,madd)
TEST_MType(0x49311119,0x4221c5df,0x76d2454d,0xff417028,0x4cb32386,0xec5921da,madd)
TEST_MType(0x0c7af836,0x5b09cda3,0xad4c4da4,0xfba1c925,0x56570542,0xf7319891,madd)
TEST_MType(0x4a0d5a7c,0x393c83bf,0xbf868bc1,0x7393efd3,0xd932953d,0x63057571,madd)
    TEST_MType(0xdb906f30, 0x0eafa7d0, 0x3fb2a701, 0xfde8e5ef,0x1,0x1,madd)
    TEST_MType(0x5aa5b57e, 0xeb138c80, 0x1475a701, 0xf897542a,0x1,0x1,madd)
    TEST_MType(0xbc61fc9c, 0x2c0b0f78, 0xb66f8d21, 0xf45deb8b,0x1,0x1,madd)
    TEST_MType(0x8b3566b7, 0x2b021ecc, 0xbb054bd5, 0xec61009f,0x1,0x1,madd)
    TEST_MType(0x666e54e8, 0xed91452c, 0x37411fe1, 0xf89fefdf,0x1,0x1,madd)
    TEST_MType(0xc6e59380, 0xfa935180, 0xc8f54001, 0x0135c231,0x1,0x1,madd)
    TEST_MType(0xd921e0b0, 0x1f7d65c0, 0x3cfdf401, 0xfb38104e,0x1,0x1,madd)
    TEST_MType(0x7b8db2e2, 0x84d37b50, 0xa9807ca1, 0xc48d6ea9,0x1,0x1,madd)
    TEST_MType(0xf89e1b58, 0x26be32a0, 0x9f784701, 0xfee1fbf2,0x1,0x1,madd)
    TEST_MType(0x524aa0a6, 0x0b334594, 0xd3839df9, 0x0399b023,0x1,0x1,madd)
    TEST_MType(0xa3be10e8, 0x18dbc860, 0x1af39701, 0xf70a9cf9,0x1,0x1,madd)
    TEST_MType(0x073cf5be, 0x4fbf4882, 0xccd43a7d, 0x0241385e,0x1,0x1,madd)
    TEST_MType(0x91db7100, 0x1f78ebb0, 0xaf98b001, 0xf2758c25,0x1,0x1,madd)
    TEST_MType(0xc49e36d8, 0x2044fa90, 0xabedc981, 0xf883c6c3,0x1,0x1,madd)
    TEST_MType(0xaf4ab2b8, 0xf0086f40, 0x4bea7601, 0x0508ac18,0x1,0x1,madd)
    TEST_MType(0xc72f0de2, 0x407a26e0, 0x62efb1c1, 0xf1b0a745,0x1,0x1,madd)
    TEST_MType(0x95d26876, 0x9aaece1c, 0xaf4660e9, 0x2a05a9e8,0x1,0x1,madd)
    TEST_MType(0x72e2ec10, 0xb9098e00, 0xbb80e001, 0xe0275a3c,0x1,0x1,madd)
    TEST_MType(0xdeb27a9c, 0x506c0849, 0x8e89d67d, 0xf589b889,0x1,0x1,madd)
    TEST_MType(0x530194f0, 0x00000000, 0x00000001, 0x00000001,0x1,0x1,madd)
    TEST_MType(0x5a1a4f60, 0x00000000, 0x00000001, 0x00000001,0x1,0x1,madd)
    TEST_MType(0x5cc4e136, 0x00000000, 0x00000001, 0x00000001,0x1,0x1,madd)
    TEST_MType(0xab7a14c0, 0x00000000, 0x00000001, 0x00000001,0x1,0x1,madd)
    TEST_MType(0x44d126d0, 0x00000000, 0x00000001, 0x00000001,0x1,0x1,madd)
    TEST_MType(0x0f114ff0, 0x00000000, 0x00000001, 0x00000001,0x1,0x1,madd)
    TEST_MType(0x60bfe48e, 0x00000000, 0x00000001, 0x00000001,0x1,0x1,madd)
    TEST_MType(0x102ceba0, 0x00000000, 0x00000001, 0x00000001,0x1,0x1,madd)
    TEST_MType(0x7b21e54d, 0x00000000, 0x00000001, 0x00000001,0x1,0x1,madd)
    TEST_MType(0x5d72f954, 0x00000000, 0x00000001, 0x00000001,0x1,0x1,madd)
    TEST_MType(0x2699b2d4, 0x00000000, 0x00000001, 0x00000001,0x1,0x1,madd)
    TEST_MType(0x66b6dc30, 0x00000000, 0x00000001, 0x00000001,0x1,0x1,madd)
    TEST_MType(0x00000000, 0x4ae569a0, 0x00000001, 0x00000001,0x1,0x1,madd)
    TEST_MType(0x00000000, 0x2582c9c0, 0x00000001, 0x00000001,0x1,0x1,madd)
    TEST_MType(0x00000000, 0xa2f01d2e, 0x00000001, 0x00000001,0x1,0x1,madd)
    TEST_MType(0x00000000, 0x2c5300d7, 0x00000001, 0x00000001,0x1,0x1,madd)
    TEST_MType(0x00000000, 0x7a95fab0, 0x00000001, 0x00000001,0x1,0x1,madd)
    TEST_MType(0x00000000, 0xf415d1b4, 0x00000001, 0x00000001,0x1,0x1,madd)
    TEST_MType(0x00000000, 0x0caf7d5c, 0x00000001, 0x00000001,0x1,0x1,madd)
    TEST_MType(0x00000000, 0xae15e524, 0x00000001, 0x00000001,0x1,0x1,madd)
    TEST_MType(0x00000000, 0x00000000, 0x00000001, 0x00000001,0x1,0x1,madd)
###detect exception
    bne s2, zero, inst_error
    nop
###score ++
    addiu s3, s3, 1
###output (s0<<24)|s3
inst_error:
    sll t1, s0, 24
    or t0, t1, s3
    sw t0, 0(s1)
    jr ra
    nop
END(my4_madd_test)
